package com.fer.t1.client.widgets.fb;

import java.util.Date;

import com.google.gwt.uibinder.client.UiConstructor;

public class FBLike extends FBWidget {

	@UiConstructor
	public FBLike(String url) {
		super(getCode(url));
		setStyleName("center500");
		id = getId();
	}
	
	static String getId()
	{
		return "fbLike" + new Date().getTime();
	}
	private static String getCode(String url) {
		return "<fb:like id=\""+getId()+"\" href=\""+url+"\" send=\"true\" width=\"500\" show_faces=\"false\" ></fb:like> ";
	}

	public void update(String url) {
		setHTML(getCode(url));
	}

	
}
